package BlogService.beans;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import BlogService.beans.Commentaire;

public class Article implements IBeans {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -329060169175982664L;
	
	private int idArticle;
	private String titre;
	private String contenu;
	private Date datePublished;
	private int isPublished;
	public User auteurArticle;
	public Categorie categorieDeLarticle;
	public Set<Commentaire> commentairesArticle;

	public Article() {
		
	}
	

	/**
	 * @return the auteurArticle
	 */
	public User getAuteurArticle() {
		return auteurArticle;
	}




	/**
	 * @param auteurArticle the auteurArticle to set
	 */
	public void setAuteurArticle(User auteurArticle) {
		this.auteurArticle = auteurArticle;
	}




	/**
	 * @return the categorieDeLarticle
	 */
	public Categorie getCategorieDeLarticle() {
		return categorieDeLarticle;
	}




	/**
	 * @param categorieDeLarticle the categorieDeLarticle to set
	 */
	public void setCategorieDeLarticle(Categorie categorieDeLarticle) {
		this.categorieDeLarticle = categorieDeLarticle;
	}




	/**
	 * @return the commentairesArticle
	 */
	public Set<Commentaire> getCommentairesArticle() {
		return commentairesArticle;
	}




	/**
	 * @param commentairesArticle the commentairesArticle to set
	 */
	public void setCommentairesArticle(Set<Commentaire> commentairesArticle) {
		this.commentairesArticle = commentairesArticle;
	}




	public void setIdArticle(int pIdArticle) {
		this.idArticle = pIdArticle;
	}

	public int getIdArticle() {
		return this.idArticle;
	}

	public void setTitre(String pTitre) {
		this.titre = pTitre;
	}

	public String getTitre() {
		return this.titre;
	}

	public void setContenu(String pContenu) {
		this.contenu = pContenu;
	}

	public String getContenu() {
		return this.contenu;
	}

	public void setDatePublished(Date pDatePublished) {
		this.datePublished = pDatePublished;
	}

	public Date getDatePublished() {
		return this.datePublished;
	}

	public void setIsPublished(int pIsPublished) {
		this.isPublished = pIsPublished;
	}

	public int getIsPublished() {
		return this.isPublished;
	}



	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Article [idArticle=" + idArticle + ", titre=" + titre
				+ ", contenu=" + contenu + ", datePublished=" + datePublished
				+ ", isPublished=" + isPublished + ", auteurArticle="
				+ auteurArticle + ", categorieDeLarticle="
				+ categorieDeLarticle + ", commentairesArticle="
				+ commentairesArticle + "]";
	}
	
}